<?php
namespace App\Repositories;

use App\Exceptions\BasicException;
use Illuminate\Support\Facades\Hash;    //引入hash

class GiveGiftDayRepository
{
    /**
     * 获取礼物总流水
     * @return bool
     */
    public function TotalGiveGiftDay()
    {
        $result = app('model_give_gift_day')->where('date','<',date('Y-m-d'))->sum('total');;
        return $result;
    }







    /**
     * 爵位详情
     * @param $id
     * @return bool
     * @throws BasicException
     */
    public function nobilityDetail($id)
    {
        $nobilityDetail = app('model_nobility')->where('id',$id)->first();
        if($nobilityDetail) return $nobilityDetail;
        throw new BasicException(50002);
    }







}


?>